

#include "atomic_op_namespace.h"

#include <sys/atomic.h>

#ifdef __HAVE_ATOMIC64_OPS

uint64_t
atomic_dec_64_nv(volatile uint64_t *addr)
{

	return (atomic_add_64_nv(addr, -1));
}

#undef atomic_dec_64_nv
atomic_op_alias(atomic_dec_64_nv,_atomic_dec_64_nv)
#if defined(_LP64)
#undef atomic_dec_ulong_nv
atomic_op_alias(atomic_dec_ulong_nv,_atomic_dec_64_nv)
__strong_alias(_atomic_dec_ulong_nv,_atomic_dec_64_nv)
#undef atomic_dec_ptr_nv
atomic_op_alias(atomic_dec_ptr_nv,_atomic_dec_64_nv)
__strong_alias(_atomic_dec_ptr_nv,_atomic_dec_64_nv)
#endif /* _LP64 */

#endif
